package com.rule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Project_name: imooc-news-dev
 * @Description:
 * @Author: Levi
 * @Date: 2021/3/31 11:02
 */
@Configuration
public class MyRule {

    /**
     * 随机的ribbon规则
     * @return
     */
    @Bean
    public IRule iRule() {
        return new RandomRule();
    }
}
